﻿using UnityEngine;
using System.Collections;

public class AircraftController : MonoBehaviour {

	public float sideMoveSpeed = 0.4f;
	public float forwardSpeed = 0.6f;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		float sideMoveDirection = 0.0f;
		if (Input.GetKey(KeyCode.A)) {
			sideMoveDirection -= 1.0f;
		}
		if (Input.GetKey(KeyCode.D)) {
			sideMoveDirection += 1.0f;
		}
		float forwardDirection = 0.0f;
		if (Input.GetKey(KeyCode.W)) {
			forwardDirection += 1.0f;
		}
		if (Input.GetKey(KeyCode.S)) {
			forwardDirection -= 1.0f;
		}
		gameObject.transform.Translate(
			(Vector3.right * sideMoveDirection * sideMoveSpeed +
			Vector3.forward * forwardDirection * forwardSpeed) * Time.deltaTime);
	}
}
